
// var util = require("../../utils/util.js");

Page({
  data:{
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数
  },
  onReady:function(){
    // 页面渲染完成
  },

  formSubmit:function(e){
    console.log("提交表单");
    console.log(e);
    var username = e.detail.value.username;
    var password = e.detail.value.password;
    if (username.length < 1) {
      wx.showToast({
        title: '用户名错误',
        image:"../images/fail.png"
      })
      return;
    }

    if (password.length < 1) {
      wx.showToast({
        title: '密码错误',
        image: "../images/fail.png"
      })
      return;
    }

  wx.showToast({
    title: '登录成功',
    image: "../images/success.png"
  })

  },
  //注册
  register:function(e){
    console.log("注册");
    console.log("==========================================\n" , e , 
  "================================================="
  )
    wx.showLoading({
      title: e,
    })
  },
  //忘记密码
  forgetpwd:function(){
    console.log("忘记密码");
  }

})